import request from '@/utils/request'
/**
 * 
 * @returns 
 */
export function getDepartments(){
    return request({
        url:'company/department'
    })
}

export function addDepartment(data){
    return request({
        url:'company/department',
        method:'post',
        data
    })
}

export function getDepartmentDetail(id){
    return request({
        url:`company/department/${id}`
    })
}

export function updateDepartment(data){
    return request({
        url:`company/department/${data.id}`,
        method:'put',
        data
    })
}

export function delDepartment(id){
    return request({
        url:`company/department/${id}`,
        method:'delete'
    })
}
